package com.zrgg.futuwen.network.observable_interface;

import com.zrgg.futuwen.network.data_model.FaceData;
import com.zrgg.futuwen.network.data_model.FileData;
import com.zrgg.futuwen.network.data_model.MainUrlData;

import java.util.List;

import okhttp3.MultipartBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

/**
 * Created by yss on 2017/4/6.
 */

public interface MyService {
    //得到网站首页地址
    @GET("/mobapp/api/getindex")
    Observable<MainUrlData> getUrl();


    //1.单张图片上传
//    参数：
//    名字:file,
//    内容:文件数据
//    cookie:cookie
    @Multipart
    @POST("/mobapp/api/uploadoneimage")
    //Observable<FileData> uploadoneimage(@PartMap Map<String, RequestBody> params);
    Observable<FileData> uploadoneimage(@Part() List<MultipartBody.Part> parts);


    // 人脸识别
    @Multipart
    @POST("/mobapp/api/facerecognition")
    Observable<FaceData> facerecognition(@Part() MultipartBody.Part img, @Part() MultipartBody.Part user_id);




    //1.单个音频上传
//    参数：
//    名字:file,
//    内容:文件数据
//    cookie:cookie
    @Multipart
    @POST("/mobapp/api/uploadonesound")
    //Observable<FileData> uploadonesound(@PartMap Map<String, RequestBody> params);
    Observable<FileData> uploadonesound(@Part() List<MultipartBody.Part> parts);

}


